package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller//相当于@Component IOC注册bean类
@RequestMapping(value = "/springMVC")
public class FirstController {
    @RequestMapping("/firstController")//映射网站
    public String sayHello() {
        System.out.println("访问到FirstController");
        return "success";//自动拼接为/WEB-INF/pages/success.jsp
    }
}
